//
//  TowBtnWithSplitLineView.swift
//  ERecycle-Shop
//
//  Created by abb on 16/8/16.
//  Copyright © 2016年 abb. All rights reserved.
//

import UIKit

class TowBtnWithSplitLineView: UIView {
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
        backgroundColor = UIColor.whiteColor()
        layer.borderWidth = 0.5
        layer.borderColor = UIColor.lightGrayColor().CGColor
        
    }
    
    private func setupUI() {
        addSubview(firstBtn)
        addSubview(splitLine)
        addSubview(secondBtn)
        
        splitLine.snp_makeConstraints { (make) in
            make.height.equalTo(self).multipliedBy(0.6)
            make.width.equalTo(0.5)
            make.center.equalTo(self)
        }
        firstBtn.snp_makeConstraints { (make) in
            make.top.left.bottom.equalTo(self)
            make.right.equalTo(splitLine.snp_left)
        }
        secondBtn.snp_makeConstraints { (make) in
            make.left.equalTo(splitLine.snp_right)
            make.top.right.bottom.equalTo(self)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    

    /// 增加缩放
    lazy var firstBtn:UIButton = UIButton(title: "接单", titleColor: UIColor.blackColor(),fontSize:14,bgColor: UIColor.whiteColor())
    /// 分割线
    private lazy var splitLine:UIView = UIView.splitLine(UIColor.grayColor())
    /// 减小缩放
    lazy var secondBtn:UIButton = UIButton(title: "详情", titleColor: UIColor.blackColor(),fontSize:14, bgColor: UIColor.whiteColor())

}
